﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace tsgl
{
    public partial class selectPublisher : Form
    {
        public selectPublisher()
        {
            InitializeComponent();
        }

        private void selectPublisher_Load(object sender, EventArgs e)
        {
            DataTable dt = bibliothecaClass.getPublisherName();
            for (int i = 0; i < dt.Rows.Count - 1; i++)
            {
                this.treeView1.Nodes.Add(dt.Rows[i][0].ToString());
            }
        }

        public string getTreeViewSelectNode()
        {
            TreeNode node=this.treeView1.SelectedNode;
            return node.ToString().Substring(10);
        }

        private void treeView1_DoubleClick(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Yes;
        }
    }
}